/**
 * long description for the file
 *
 * @summary 取管理员
 * @author wu[308822989@qq.com]
 *
 * Created at     : 2018-12-28 13:29:05
 * Last modified  : 2019-01-04 10:57:36
 */

import request from '../../utils/request'

export function list(params) {
  return request({
    url: '/admin/admin/index',
    method: 'get',
    params
  })
}

export function del(items) {
    let ids = [];
    items.forEach(element => {
        ids.push(element.id);
    });
    return request({
      url: '/admin/admin/destory',
      method: 'post',
      data: {ids: ids.join(',')}
    })
}

export function add(data) {
    return request({
      url: '/admin/admin/store',
      method: 'post',
      data: data
    })
}

export function info(data) {
  return request({
    url: '/admin/admin/info',
    method: 'get',
    params: {id: data.id}
  })
}

